package com.yanggu.scala.chapater04

object ForDemo05 {

  def main(args: Array[String]): Unit = {
    val start = 1
    val end = 100
    var total = 0
    var number = 0
    for (i <- start to end if i % 9 == 0) {
      total += i
      number += 1
    }
    println("总和: " + total)
    println("总个数: " + number)
  }

}
